Avoid compiler warnings.
apic_write_around(APIC_LVT0, v);
}
-static void setup_nmi (void)
-{
- /*
- * Dirty trick to enable the NMI watchdog ...
- * We put the 8259A master into AEOI mode and
- * unmask on all local APICs LVT0 as NMI.
- *
- * The idea to use the 8259A in AEOI mode ('8259A Virtual Wire')
- * is from Maciej W. Rozycki - so we do not have to EOI from
- * the NMI handler or the timer interrupt.
- */
- printk(KERN_INFO "activating NMI Watchdog ...");
-
- smp_call_function(enable_NMI_through_LVT0, NULL, 1, 1);
- enable_NMI_through_LVT0(NULL);
-
- printk(" done.\n");
-}
-
/*
* This looks a bit hackish but it's about the only one way of sending
* a few INTA cycles to 8259As and any associated glue logic. ICR does
udelay(50);
}
/* That didn't work - force a triple fault.. */
- __asm__ __volatile__("lidt %0": :"m" (no_idt));
+ __asm__ __volatile__("lidt %0": "=m" (no_idt));
__asm__ __volatile__("int3");
}
}
struct task_struct *idle_task[NR_CPUS] = { &idle0_task };
#ifdef CONFIG_ACPI_INTERPRETER
- int acpi_disabled = 0;
+int acpi_disabled = 0;
#else
- int acpi_disabled = 1;
+int acpi_disabled = 1;
#endif
EXPORT_SYMBOL(acpi_disabled);
void __init get_cpu_vendor(struct cpuinfo_x86 *c)
{
- char *v = c->x86_vendor_id;
-
- if (!strcmp(v, "GenuineIntel"))
- c->x86_vendor = X86_VENDOR_INTEL;
- else if (!strcmp(v, "AuthenticAMD"))
- c->x86_vendor = X86_VENDOR_AMD;
- else if (!strcmp(v, "CyrixInstead"))
- c->x86_vendor = X86_VENDOR_CYRIX;
- else if (!strcmp(v, "UMC UMC UMC "))
- c->x86_vendor = X86_VENDOR_UMC;
- else if (!strcmp(v, "CentaurHauls"))
- c->x86_vendor = X86_VENDOR_CENTAUR;
- else if (!strcmp(v, "NexGenDriven"))
- c->x86_vendor = X86_VENDOR_NEXGEN;
- else if (!strcmp(v, "RiseRiseRise"))
- c->x86_vendor = X86_VENDOR_RISE;
- else if (!strcmp(v, "GenuineTMx86") ||
- !strcmp(v, "TransmetaCPU"))
- c->x86_vendor = X86_VENDOR_TRANSMETA;
- else
- c->x86_vendor = X86_VENDOR_UNKNOWN;
+ char *v = c->x86_vendor_id;
+
+ if (!strcmp(v, "GenuineIntel"))
+ c->x86_vendor = X86_VENDOR_INTEL;
+ else if (!strcmp(v, "AuthenticAMD"))
+ c->x86_vendor = X86_VENDOR_AMD;
+ else if (!strcmp(v, "CyrixInstead"))
+ c->x86_vendor = X86_VENDOR_CYRIX;
+ else if (!strcmp(v, "UMC UMC UMC "))
+ c->x86_vendor = X86_VENDOR_UMC;
+ else if (!strcmp(v, "CentaurHauls"))
+ c->x86_vendor = X86_VENDOR_CENTAUR;
+ else if (!strcmp(v, "NexGenDriven"))
+ c->x86_vendor = X86_VENDOR_NEXGEN;
+ else if (!strcmp(v, "RiseRiseRise"))
+ c->x86_vendor = X86_VENDOR_RISE;
+ else if (!strcmp(v, "GenuineTMx86") ||
+ !strcmp(v, "TransmetaCPU"))
+ c->x86_vendor = X86_VENDOR_TRANSMETA;
+ else
+ c->x86_vendor = X86_VENDOR_UNKNOWN;
}
static void __init init_intel(struct cpuinfo_x86 *c)
static void __init do_initcalls(void)
{
- initcall_t *call;
-
- call = &__initcall_start;
- do {
- (*call)();
- call++;
- } while (call < &__initcall_end);
+ initcall_t *call;
+ for ( call = &__initcall_start; call < &__initcall_end; call++ )
+ (*call)();
}
/*
APIC_init_uniprocessor();
else
smp_boot_cpus();
- /*
- * Does loads of stuff, including kicking the local
- * APIC, and the IO APIC after other CPUs are booted.
- * Each IRQ is preferably handled by IO-APIC, but
- * fall thru to 8259A if we have to (but slower).
- */
+ /*
+ * Does loads of stuff, including kicking the local
+ * APIC, and the IO APIC after other CPUs are booted.
+ * Each IRQ is preferably handled by IO-APIC, but
+ * fall thru to 8259A if we have to (but slower).
+ */
#endif
initialize_keytable(); /* call back handling for key codes */
}
-static void process_timeout(unsigned long __data)
-{
- struct task_struct * p = (struct task_struct *) __data;
- wake_up(p);
-}
-
-
static void dump_rqueue(struct list_head *queue, char *name)
{
struct list_head *list;
/* Originally cciss driver only supports 8 major number */
#define MAX_CTLR_ORIG COMPAQ_CISS_MAJOR7 - COMPAQ_CISS_MAJOR + 1
-#define CCISS_DMA_MASK 0xFFFFFFFFFFFFFFFF /* 64 bit DMA */
+#define CCISS_DMA_MASK (~0UL)
#ifdef CONFIG_CISS_MONITOR_THREAD
static int cciss_monitor(void *ctlr);
return 0;
}
+#if 0
static
int ide_cdrom_reinit (ide_drive_t *drive)
{
return 0;
}
+#endif /* 0 */
static ide_driver_t ide_cdrom_driver = {
name: "ide-cdrom",
static void mptscsih_dv_parms(MPT_SCSI_HOST *hd, DVPARAMETERS *dv,void *pPage);
static void mptscsih_fillbuf(char *buffer, int size, int index, int width);
#endif
-/*static int mptscsih_setup(char *str);*/
+#if XEN_KILLED
+static int mptscsih_setup(char *str);
static int mptscsih_halt(struct notifier_block *nb, ulong event, void *buf);
-#if XEN_KILLED
/*
* Reboot Notification
*/
return 0;
}
+#if 0 /* XEN */
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
/**
* mptscsih_halt - Process the reboot notification
#endif
return NOTIFY_OK;
}
+#endif /* 0 (XEN) */
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
/**
#define off_t int
#endif
+#if 0 /* XEN */
static int mptscsih_host_info(MPT_ADAPTER *ioc, char *pbuf, off_t offset, int len)
{
struct info_str info;
return ((info.pos > info.offset) ? info.pos - info.offset : 0);
}
+#endif /* 0 (XEN) */
#ifndef MPTSCSIH_DBG_TIMEOUT
+#if 0 /* XEN */
static int mptscsih_user_command(MPT_ADAPTER *ioc, char *pbuf, int len)
{
/* Not yet implemented */
return len;
}
+#endif /* 0 (XEN) */
#else
#define is_digit(c) ((c) >= '0' && (c) <= '9')
#define digit_to_bin(c) ((c) - '0')
MODULE_PARM_DESC(X, S);
/* ====================================================================== */
+#if 0
static u8 e100_D101M_checksum(struct e100_private *, struct sk_buff *);
static u8 e100_D102_check_checksum(rfd_t *);
-#if 0
static int e100_ioctl(struct net_device *, struct ifreq *, int);
#endif
static int e100_open(struct net_device *);
char *);
unsigned char e100_wait_exec_cmplx(struct e100_private *, u32, u8, u8);
void e100_exec_cmplx(struct e100_private *, u32, u8);
-static unsigned char e100_asf_enabled(struct e100_private *bdp);
+/*static unsigned char e100_asf_enabled(struct e100_private *bdp);*/
/**
* e100_get_rx_struct - retrieve cell to hold skb buff from the pool
}
/* Check the D102 RFD flags to see if the checksum passed */
+#if 0
static unsigned char
e100_D102_check_checksum(rfd_t *rfd)
{
}
return CHECKSUM_NONE;
}
+#endif /* 0 */
/**
* e100_D101M_checksum
* in case the packet is ethernet II and the protocol is IP, all is need is to
* assign this value to skb->csum.
*/
+#if 0
static unsigned char
e100_D101M_checksum(struct e100_private *bdp, struct sk_buff *skb)
{
}
return CHECKSUM_NONE;
}
+#endif /* 0 */
/***************************************************************************/
/***************************************************************************/
return 0;
}
-#endif /* CONFIG_PM */
/**
* e100_asf_enabled - checks if ASF is configured on the current adaper
}
return false;
}
+#endif /* CONFIG_PM */
#ifdef E100_CU_DEBUG
unsigned char
#endif /* ETHTOOL */
+#if 0
static int tg3_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
{
struct tg3 *tp = dev->priv;
return r;
}
+#endif /* 0 */
#ifdef ETHTOOL
#endif /* ETHTOOL */
+#if 0
static u32 tg3_get_rx_csum(struct net_device *dev)
{
struct tg3 *tp = dev->priv;
return 0;
}
-
+#endif /* 0 */
+
static int tg3_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
{
struct mii_ioctl_data *data = (struct mii_ioctl_data *)&ifr->ifr_data;
return NULL;
}
+#ifndef NO_DEVICES_IN_XEN
static int
pci_announce_device(struct pci_driver *drv, struct pci_dev *dev)
{
out:
return ret;
}
+#endif /* !NO_DEVICES_IN_XEN */
/**
* pci_register_driver - register a new pci driver
}
+#if 0 /* XEN */
/*
BusLogic_ParseKeyword parses an individual option keyword. It returns true
and updates the pointer if the keyword is recognized and false otherwise.
return true;
}
-#if 0 /* XEN */
/*
BusLogic_ParseDriverOptions handles processing of BusLogic Driver Options
specifications.
static boolean BusLogic_TargetDeviceInquiry(BusLogic_HostAdapter_T *) __init;
static void BusLogic_InitializeHostStructure(BusLogic_HostAdapter_T *,
SCSI_Host_T *) __init;
-static boolean BusLogic_ParseKeyword(char **, char *) __init;
#if 0 /* XEN */
+static boolean BusLogic_ParseKeyword(char **, char *) __init;
static int BusLogic_ParseDriverOptions(char *) __init;
static int BusLogic_Setup(char *) __init;
#endif
return aac_do_ioctl(dev, cmd, arg);
}
+#if 0 /* XEN */
/**
* aac_cfg_open - open a configuration file
* @inode: inode being opened
struct aac_dev *dev = aac_devices[MINOR(inode->i_rdev)];
return aac_do_ioctl(dev, cmd, (void *)arg);
}
+#endif /* 0 (XEN) */
/*
* To use the low level SCSI driver support using the linux kernel loadable
static void ahd_runq_tasklet(unsigned long data);
/* SAE: .... */
struct notifier_block;
-static int ahd_linux_halt(struct notifier_block *nb, u_long event, void *buf);
+/*static int ahd_linux_halt(struct notifier_block *nb, u_long event, void *buf);*/
static __inline struct ahd_linux_device*
ahd_linux_get_device(struct ahd_softc *ahd, u_int channel,
consumed++;
next_sg = sg + 1;
next_sg->addr = 0;
- next_len = 0x100000000 - (addr & 0xFFFFFFFF);
+ next_len = (uint32_t)((-addr) & 0xFFFFFFFF);
len -= next_len;
next_len |= ((addr >> 8) + 0x1000000) & 0x7F000000;
next_sg->len = ahd_htole32(next_len);
static struct notifier_block ahd_linux_notifier = {
ahd_linux_halt, NULL, 0
};
-*/
static int ahd_linux_halt(struct notifier_block *nb, u_long event, void *buf)
{
}
return (NOTIFY_OK);
}
+*/
/******************************** Macros **************************************/
#define BUILD_SCSIID(ahd, cmd) \
uint64_t memsize;
memsize = ahd_linux_get_memsize();
- if (memsize >= 0x8000000000
+ if (memsize >= 0x8000000000ULL
&& ahd_pci_set_dma_mask(pdev, 0xFFFFFFFFFFFFFFFFULL) == 0) {
ahd->flags |= AHD_64BIT_ADDRESSING;
ahd->platform_data->hw_dma_mask =
(bus_addr_t)(0xFFFFFFFFFFFFFFFFULL&(bus_addr_t)~0);
- } else if (memsize > 0x80000000
+ } else if (memsize > 0x80000000ULL
&& ahd_pci_set_dma_mask(pdev, 0x7FFFFFFFFFULL) == 0) {
ahd->flags |= AHD_39BIT_ADDRESSING;
ahd->platform_data->hw_dma_mask =
struct scb *);
static void ahc_linux_filter_command(struct ahc_softc*, Scsi_Cmnd*,
struct scb*);
-//static void ahc_linux_sem_timeout(u_long arg);
+#if 0
+static void ahc_linux_sem_timeout(u_long arg);
static void ahc_linux_freeze_sim_queue(struct ahc_softc *ahc);
static void ahc_linux_release_sim_queue(u_long arg);
+#endif
static void ahc_linux_dev_timed_unfreeze(u_long arg);
static int ahc_linux_queue_recovery_cmd(Scsi_Cmnd *cmd, scb_flag flag);
static void ahc_linux_initialize_scsi_bus(struct ahc_softc *ahc);
static void ahc_linux_setup_tag_info(char *p, char *end);
static int ahc_linux_next_unit(void);
static void ahc_runq_tasklet(unsigned long data);
+#if 0
static int ahc_linux_halt(struct notifier_block *nb, u_long event, void *buf);
+#endif
static __inline struct ahc_linux_device*
ahc_linux_get_device(struct ahc_softc *ahc, u_int channel,
consumed++;
next_sg = sg + 1;
next_sg->addr = 0;
- next_len = 0x100000000 - (addr & 0xFFFFFFFF);
+ next_len = (uint32_t)((-addr) & 0xFFFFFFFF);
len -= next_len;
next_len |= ((addr >> 8) + 0x1000000) & 0x7F000000;
next_sg->len = ahc_htole32(next_len);
static struct notifier_block ahc_linux_notifier = {
ahc_linux_halt, NULL, 0
};
-#endif
static int ahc_linux_halt(struct notifier_block *nb, u_long event, void *buf)
{
}
return (NOTIFY_OK);
}
+#endif
/******************************** Macros **************************************/
#define BUILD_SCSIID(ahc, cmd) \
sem = (struct semaphore *)arg;
up(sem);
}
-#endif
static void
ahc_linux_freeze_sim_queue(struct ahc_softc *ahc)
#endif
}
}
+#endif /* 0 */
static void
ahc_linux_dev_timed_unfreeze(u_long arg)
}
+#if 0 /* XEN */
/*
* This routine will be called when the use has done a forced shutdown on the
* system. Flush the Adapter cache, that's the most we can do.
}
return NOTIFY_DONE;
}
+#endif /* 0 (XEN) */
static int mega_init_scb (mega_host_config * megacfg)
{
}
}
+#if 0 /* XEN */
/*
* Routines for the character/ioctl interface to the driver
*/
return ret;
}
+#endif /* 0 (XEN) */
static int megadev_ioctl (struct inode *inode, struct file *filep,
unsigned int cmd, unsigned long arg)
return scb;
}
+#if 0
static int
megadev_close (struct inode *inode, struct file *filep)
{
#endif
return 0;
}
+#endif /* 0 */
static int
mega_Enquiry3 * enquiry3,
megaRaidProductInfo * productInfo);
+#if 0
static int megaraid_reboot_notify (struct notifier_block *,
unsigned long, void *);
+#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0)
static mega_scb *mega_ioctl (mega_host_config * megaCfg, Scsi_Cmnd * SCpnt);
static void mega_build_kernel_sg (char *barea, ulong xfersize, mega_scb * pScb,
mega_ioctl_mbox * mbox);
#endif
+#if 0
static int megadev_open (struct inode *, struct file *);
static int megadev_ioctl_entry (struct inode *, struct file *,
unsigned int, unsigned long);
+#endif
static int megadev_ioctl (struct inode *, struct file *,
unsigned int, unsigned long);
static mega_scb *megadev_doioctl (mega_host_config *, Scsi_Cmnd *);
+#if 0
static int megadev_close (struct inode *, struct file *);
+#endif
static void megadev_ioctl_done (Scsi_Cmnd *);
static int mega_init_scb (mega_host_config *);
static void enq_scb_freelist (mega_host_config *, mega_scb *,
/*
* Some timeout handler to avoid waiting too long.
*/
-static void sym_eh_timeout(u_long p) { __sym_eh_done((Scsi_Cmnd *)p, 1); }
+/*static void sym_eh_timeout(u_long p) { __sym_eh_done((Scsi_Cmnd *)p, 1); }*/
/*
* Generic method for our eh processing.